package top.healthylife.gateway.platform.tc.api.api;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.tc.api.util.TcHttpUtil;
import top.healthylife.gateway.platform.tc.dto.bank4.req.TcReqBankCardFourElementsVerificationDto;
import top.healthylife.gateway.platform.tc.dto.bank4.res.TcResBankCardFourElementsVerificationDto;

/**
 * @author GaoZeXi
 * @date 2021/7/20 13:19
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "银行卡四要素验证",docUrl = "http://api.tcredit.com/norns/service/cas/doLogin" +
        "?service=http://api.tcredit.com/odin/user/sso", info = "对输入身份证号和姓名进行认证,返回认证结果")
public class TcBankCardFourElementsVerificationApi implements ParentFace<TcReqBankCardFourElementsVerificationDto, TcResBankCardFourElementsVerificationDto> {

    static final String URL = "http://api.ypcredit.com/bankcard/bankcardInfo4";

    @Override
    public TcResBankCardFourElementsVerificationDto execute(TcReqBankCardFourElementsVerificationDto dto) {
        return TcHttpUtil.getApiData(URL,dto,TcResBankCardFourElementsVerificationDto.class);
    }
}
